import { onMounted } from 'vue'
import { getSingers } from '@/api/singer'

function useSingerApi(singerListRef) {
  onMounted(async () => {
    const res = await getSingers()
    if (res.code === 0) {
      singerListRef.value = res.result.singers
    }
  })
}

export default useSingerApi
